<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>广汽菲克</title>
</head>
<script src="js/jquery/jquery-1.8.2.js"></script>
<script src="js/jquery/jquery.bgiframe-2.1.2.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<body>
<div id="Wrap" style="text-align: center;margin:0,auto;heigth:100%">
	<div style="display:none;">
	<form id="myform" method="post" target="_blank">
		<input type="text" id="username" name="username" value="{$username}"/>
		<input type="text" id="password" name="password" value="{$password}"/>
		<input type="text" id="r" name="r" value="{$r}"/>
	</form>
	<form id="publicform" method="post" target="_blank">
	</form>
	</div>
	<div style="width:100%;text-align: left;">
	<header>
		<ul>
			<li>
			  <img src="images/logo.png" height="50">
			  <img src="images/mofang.png" height="50" style="margin-left:40px;">
			  <div style="float:right;padding-right:160px;">
			  	{$username} 
			  	<a onclick="logout();return false;" href="#">[ 退出 ]</a>
			  </div>
			</li>
		</ul>
	</header>
	</div>
	<div style="width:100%;text-align: left;margin-top:100px;">
	<table style="width:800px;margin:0 auto;">
		<tr >
			<td id="mytr"></td>
		</tr>
	</table>
	</div>
	<div style="position:fixed; bottom:0;">
	  
	</div>
</div>
{literal}
<style>
.button_div{float:left;margin-left:5%;}
.button_div_img{width:150px;heigth:200px;border:1px solid #BCBEC3;}
.button_div_font{background: #f7f7f7;border:1px solid #BCBEC3;height:40px;}
.button_div_img_sjgl{background: #fff;margin-top:39px;margin-bottom:37px;margin-left:20px;margin-right:20px;}
.button_div_img_tfsj{background: #fff;margin-top:28px;margin-left:46px;margin-bottom:28px;}
.button_div_font_sjgl{margin-left:37px;margin-top:12px;}
</style>
<script>
	$(function(){
	 	var r = $("#r").val();
	 	if(r!=null&&r!=""){
	 		var strs= new Array();
	 		strs=r.split(",");
	 		
	 		for(i=0;i< strs.length; i++ ){
	 			var tr1 = '<div class="button_div">'+
						  '<a onclick="tiaozhuan(1);" style="cursor: pointer;">'+
						  	'<div class="button_div_img">'+
								'<div class="button_div_img_sjgl">'+
									'<img src="images/1.png" width="110px" height="40px"/></div>'+
								'<div class="button_div_font">'+
									'<div class="button_div_font_sjgl"><font>试驾管理系统</font></div></div></div></a></div>';
				var tr2='<div class="button_div">'+
						  '<a onclick="tiaozhuan(2);" style="cursor: pointer;">'+
						    '<div class="button_div_img">'+
							    '<div class="button_div_img_tfsj">'+
							    	'<img src="images/2.png" width="60px" height="60px"/>'+
							    '</div>'+
							    '<div class="button_div_font">'+
							    	'<div class="button_div_font_sjgl"><font>投放购买数据</font></div></div></div></a></div>';
				var tr3='<div class="button_div">'+
						  '<a onclick="tiaozhuan(3);" style="cursor: pointer;">'+
						    '<div class="button_div_img">'+
							   ' <div class="button_div_img_tfsj">'+
							    	'<img src="images/3.png" width="60px" height="60px"/></div>'+
							   ' <div class="button_div_font">'+
							    	'<div class="button_div_font_sjgl"><font>公关项目管理</font></div></div></div></a></div>';
				var tr4='<div class="button_div">'+
						 ' <a onclick="tiaozhuan(4);" style="cursor: pointer;">'+
						   ' <div class="button_div_img">'+
							  '  <div class="button_div_img_tfsj">'+
							    '	<img src="images/4.png" width="60px" height="60px"/></div>'+
							  '  <div class="button_div_font">'+
							    	'<div style="margin-left:51px;margin-top:12px;"><font>内容厨房</font></div></div></div></a></div>';
	 			if(strs[i] == 1){
	 				$("#mytr").append(tr1);
	 			}else if(strs[i] == 2){
	 				$("#mytr").append(tr2);
	 			}else if(strs[i] == 3){
	 				$("#mytr").append(tr3);
	 			}else if(strs[i] == 4){
	 				$("#mytr").append(tr4);
	 			}
	 		}
 			if(strs[i] == 1){
				$("#td"+strs[i]+"").css('display','');
 			}else{
				$("#td"+strs[i]+"").remove();
 			}
	 	}
	});
	function tiaozhuan(id){
		var myform=$("#myform");
		var publicform=$("#publicform");
		if(id==3){
			$.ajax({  
		        url:"http://115.28.22.88:8001/app.php?act=login",  
		        dataType:'jsonp',  
		        data:{u:$("#username").val(),p:$("#password").val()},  
		        jsonp:'callback',  
		        success:function(d) {
					if(d.st=="ok"){
						//$("#publicform").attr();
						//$("#publicform").submit();
						window.open("http://115.28.22.88:8001/project.php");
					}else{
						alert(j.msg);
					} 
		        }, 
		        error : function(r){
					alert("系统出错，请联系系统管理员");
				},
		        timeout:3000  
		    });
		}else if(id==1){
			$("#myform").attr("action","http://jeepcar.chrysler-online.com.cn/Login/checking");
			$("#myform").submit();
		}else if(id==2){
			$.ajax({  
		        url:"http://115.28.49.63:802/app.php?act=login",  
		        dataType:'jsonp',  
		        data:{u:$("#username").val(),p:$("#password").val()},  
		        jsonp:'callback',  
		        success:function(d) {
			        if(d.st=="ok"){
						//$("#publicform").attr();
						//$("#publicform").submit();
						window.open("http://115.28.49.63:802/index.php");
					}else{
						alert(j.msg);
					}
		        }, 
		        error : function(r){
					alert("系统出错，请联系系统管理员");
				},
		        timeout:3000  
		    });
		}else if(id==4){
			//$("#publicform").attr();
			//$("#publicform").submit();
			window.open("http://database.chrysler-online.com.cn/?act=main");
		}
	}
	function logout(){
		if (confirm("您确定要退出控制面板吗？")){
			top.location = "index.php?act=loginMain";
		}
		return false;
	}
</script>
{/literal}
</body>
</html>

